package com.imooc.dianping.service;

import com.imooc.dianping.common.BusinessException;
import com.imooc.dianping.model.UserModel;

import java.security.NoSuchAlgorithmException;

public interface UserService {
    UserModel getUser(Integer id);

    /**
     * 注册
     * @param userModel
     * @return
     */
    UserModel register(UserModel userModel) throws BusinessException, NoSuchAlgorithmException;

    /**
     * 登陆
     * @param telphone
     * @param password
     * @return
     */
    UserModel login(String telphone,String password) throws NoSuchAlgorithmException, BusinessException;

    /**
     * 查询用户数量
     * @return
     */
    Integer countAllUser();

}
